#!/bin/bash

filepath=`find -name *.less`
EXEC=lessc
ARGS=-x

for i in $filepath
do 
  #echo "Convert file $i ..."
  
  filename=`basename $i`
  dirname=`dirname $i`
  
  beforename=${filename%.*}
  
  sourcefile=$i
  distination=$dirname/$beforename.css
  
  #echo "start do: $EXEC $ARGS $sourcefile $distination "
  $EXEC $ARGS $sourcefile $distination
done

